﻿using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetExp.MediaXenter.Utilities
{
    public class FontStyle
    {
        private System.Windows.FontStyle _fontStyle;
        private System.Windows.FontWeight _fontWeight;
        private Font _font;
        private System.Windows.Media.FontFamily  _fontFamily;
        private float _fontSize;
        private bool _bold;
        private bool _italic;
        private bool _underline;
        private string _codeColor;
        private System.Windows.Media.Color _color;

        public System.Windows.FontWeight Weight
        {
            get
            {
                return _fontWeight;
            }
        }
        public System.Windows.FontStyle Style
        {
            get
            {
                return _fontStyle;
            }
        }
        public System.Windows.Media.FontFamily   FontFamily
        {
            get
            {
                return _fontFamily;
            }
        }
        public float FontSize
        {
            get
            {
                return _fontSize;
            }
        }
        public bool Bold
        {
            get
            {
                return _bold;
            }
        }
        public bool Italic
        {
            get
            {
                return _italic;
            }
        }
        public bool Underline
        {
            get
            {
                return _underline;
            }
        }
        public string CodeColor
        {
            get
            {
                return _codeColor;
            }
        }
        public Font Font
        {
            get
            {
                return _font;
            }
        }
        public System.Windows.Media.Color Color
        {
            get
            {
                return _color;
            }
        }
        public FontStyle(string family, float size, bool bold, bool italic, bool underline, string colore)
        {
            _fontFamily = new System.Windows.Media.FontFamily( family);
            _fontSize = size;
            _underline = underline;
            _bold = bold;
            _italic = italic;
            _codeColor = colore;
            if (italic)
                _fontStyle = System.Windows.FontStyles.Italic;
            if (bold)
                _fontWeight = System.Windows.FontWeights.Bold;
            else
                _fontWeight = System.Windows.FontWeights.Normal;

            Font font = Helper.GetFont(family, _fontSize, _bold, _italic, _underline);

            System.Windows.Media.Color color = Helper.GetColor(_codeColor);

            _color = color;
            _font = font;
        }
    }
}
